import java.util.Arrays;

public class Text {
    public static void main(String[] args) {
        Student[] stu = new Student[3];
        stu[0] = new Student("Liu六大顺",18,88);
        stu[1] = new Student("Qi星高照",22,98);
        stu[2] = new Student("San羊开泰",19,100);

        //以年龄比较
        AgeComparator ageComparator = new AgeComparator();
        Arrays.sort(stu,ageComparator);
        System.out.println(Arrays.toString(stu));

        //以成绩来比较
        ScoreComparator scoreComparator = new ScoreComparator();
        Arrays.sort(stu,scoreComparator);
        System.out.println(Arrays.toString(stu));

        //以姓名排序
        NameComparator nameComparator = new NameComparator();
        Arrays.sort(stu,nameComparator);
        System.out.println(Arrays.toString(stu));

    }

}
